﻿using FastCloud.Base;
using FastCloud.Base.Attribute;
using FastCloud.Base.Config;
using FastUtil.Config;
using Microsoft.AspNetCore.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace FastCloud.Controllers.Home
{
    [Route("frame/home/error")]
    [AllowAnonymous]
    public class ErrorController : BaseController
    {
        [Route("404")]
        public IActionResult Error404()
        {
            ViewData["HomeUrl"] = AppConfigUtil.Configuration["Frame:DefaultHomeUrl"];
            return View("~/Views/Home/Error404.cshtml");
        }

        [Route("500")]
        public IActionResult Error500()
        {
            ViewData["HomeUrl"] = AppConfigUtil.Configuration["Frame:DefaultHomeUrl"];
            return View("~/Views/Home/Error500.cshtml");
        }
    }
}
